package entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
//Spring中实例化bean 1、使用构造器实例化
@AllArgsConstructor
//@NoArgsConstructor
public class Student {
    private String name = "y";

    public Student(){
        System.out.println("调用Student的无参构造器创建对象");
    }

    public void init(){
        System.out.println("Student的init初始化方法");
    }

    public void destroy(){
        System.out.println("Student的销毁的方法");
    }

}
